//
//  CategoryViewCell.m
//  JiaoX
//
//  Created by 尹桥印 on 14/11/18.
//  Copyright (c) 2014年 北京娇羞科技有限公司. All rights reserved.
//

#import "CategoryCell.h"
#import "CategoryCellView.h"

@interface CategoryCell()
    

@end

@implementation CategoryCell


+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *ID = @"categoryItem";
    CategoryCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[CategoryCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
    }
    return cell;
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        CategoryCellView *categoryView = [[CategoryCellView alloc]init];
        [self addSubview:categoryView];
        _cellView = categoryView;
    }
    return self;
}

-(void)setSubCagetoryList:(NSArray *)array{
    [_cellView setSubcategoryList:array];
}

@end
